import request from "@/utils/request";
// 调用权限
export default {
  getDocumentTemporary(id,data) {
    return request({
      url: "/api/tickets/temporary/"+id+"/",
      method: "get",
      params: data
    });
  },
  setDocumentTemporary(id,data) {
    return request({
      url: "/api/tickets/temporary/"+id+"/",
      method: "post",
      data
    });
  },
  getDeptsFzr(data) {
    return request({
      url: "/api/accounts/depts_fzr/",
      method: "get",
      params: data
    });
  },
  getAccountsRolesXld(data) {
    return request({
      url: "/api/accounts/roles/xld/",
      method: "get",
      params: data
    });
  },
  getAccountsRolesXldTwo(data) {
    return request({
      url: "/api/accounts/roles/xld_two/",
      method: "get",
      params: data
    });
  },
  uploadRichFile(data) {
    return request({
      url: "/api/upload_file/",
      method: "post",
      data
    });
  },
  getWorkflowsSimple(params) {
    return request({
      url: "/api/workflows/simple/",
      method: "get",
      params
    });
  },
  //这是公文里的分发传阅动态接口，通常会和流程组合用，所以放到common里面来
  getDocumentDistFlowLogs(data) {
    return request({
      url: "/api/document/dist/flowlogs/",
      method: "get",
      params: data
    });
  },
  setTicketsEdit(id,data) {
    return request({
      url: "/api/tickets/"+id+"/set_edit/",
      method: "put",
      data
    });
  },
  getAliasById(data) {
    return request({
      url: "/api/accounts/id_to_alias/",
      method: "post",
      data
    });
  },
  getAccountSelect(data) {
    return request({
      url: "/api/accounts/select/",
      method: "get",
      params: data
    });
  },
};
